package com.yn.pet.bus.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * 实时定位信息表(LocationRealtime)表实体类
 *
 * @author makejava
 * @since 2025-07-09 12:00:47
 */
@Data
@TableName("t_location_realtime")
@EqualsAndHashCode(callSuper = true)
public class LocationRealtime extends Model<LocationRealtime> {
    //定位ID
    @TableId
    private Long locationId;
    //设备ID
    private Long deviceId;


    //经度
    private Double longitude;
    //纬度
    private Double latitude;

    //详细位置
    private String detailedLocation;

    //行走距离
    private Double mileage;

    //海拔(m)
    private Double altitude;
    //速度(km/h)
    private int speed;
    //方向(0-359)
    private Integer direction;
    //定位精度(m)
    private Double accuracy;
    //卫星数量
    private Integer satelliteNum;
    //电池电量(0-100)
    private Integer battery;
    //电池电量报警1是 0 否
    private Integer batteryAlarm;

    //GPS时间
    private Date gpsTime;

    //信号强度
    private Integer signalStrength;
    //服务器接收时间
    private Date receiveTime;
    //定位类型(0-GPS,1-LBS,2-WiFi)
    private Integer locationType;
    //数据状态1有效0无效  2绑定设备的初始状态
    private Integer dataStatus;
    //创建时间
    private Date createTime;
    //创建人
    private String createBy;
    //更新时间
    private Date updateTime;
    //更新人
    private String updateBy;

//    @TableField(exist = false)
    private Integer deviceStatus;

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    public Serializable pkVal() {
        return this.locationId;
    }
}

